package com.autumn.zero.authorization.application.services;

import java.util.List;

import com.autumn.zero.application.services.IZeroEditAppService;
import com.autumn.zero.authorization.application.dto.PermissionDto;
import com.autumn.zero.authorization.application.dto.PermissionGrantedInput;
import com.autumn.zero.authorization.application.dto.roles.RoleDto;
import com.autumn.zero.authorization.application.dto.roles.RoleInput;
import com.autumn.zero.authorization.application.dto.roles.RoleOutput;
import com.autumn.zero.authorization.application.dto.roles.RolePermissionOutput;
import com.autumn.zero.authorization.values.ResourcesModulePermissionTreeValue;

/**
 * 角色应用服务
 * 
 * @author 杨昌国 2018-12-10 15:42:16
 */
public interface IRoleAppService extends IZeroEditAppService<Long, RoleInput, RoleInput, RoleOutput, RoleDto> {

	/**
	 * 授权
	 * 
	 * @param input
	 *            输入
	 * @return
	 */
	RolePermissionOutput authorize(PermissionGrantedInput input);

	/**
	 * 授权查询
	 * 
	 * @param input
	 *            输入
	 * @return
	 */
	RolePermissionOutput authorizeByQuery(PermissionDto input);

	/**
	 * 角色授权模块树
	 * 
	 * @param input
	 *            输入
	 * @return
	 */
	List<ResourcesModulePermissionTreeValue> authorizeByModulePermissionTree(PermissionDto input);

	/**
	 * 角色授权模板所有权限
	 * 
	 * @param input
	 *            输入
	 * @return
	 */
	void authorizeByAllPermission(PermissionDto input);
}
